package time;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class TimeTest4 {
    public static void main(String[] args) {
        long min = Long.MAX_VALUE;
        for (int i = 0; i < 1000; i++) {
            long start = System.nanoTime();
            long end = System.nanoTime();
            long diff = end - start;
            log.info("当前 diff：{}", diff);
            if (diff != 0 && diff < min) {
                min = diff;
            }
        }
        log.info("推测的最小粒度：{} ns", min);
    }
}
